package com.yishu.shop.service;

import com.ys.commons.model.JsonResponse;
import com.ys.commons.model.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *
 *
 * @author zengchao
 * @date 2021-07-07 21:35:49
 */
@FeignClient(name = "user-server",fallback = UserServiceFallback.class)
public interface UserService {
    /**
     * 根据用户ID获取用户信息
     * @param id 用户ID
     * @return
     */
    @GetMapping("/user")
    JsonResponse<UserDto> getUser(@RequestParam("id")Integer id);
}